package com.joshua.spring.fallback;

import com.joshua.spring.entity.em.ResponseEnum;
import com.joshua.spring.entity.vo.GlobalResponse;
import com.joshua.spring.spi.FtConsumerClient;
import org.springframework.stereotype.Component;

/**
 * description
 * package com.joshua.spring.fallback
 * classname  FtConsumerClientFallback
 *
 * @author <a href="mailto:joshualwork@163.com">joshua_liu</a>
 * @date 2020/4/2 14:26
 */
@Component
public class FtConsumerClientFallback implements FtConsumerClient {

    @Override
    public GlobalResponse pathInfo() {
        return GlobalResponse.buildFail(ResponseEnum.REQUEST_BREAKING);
    }

    @Override
    public GlobalResponse paramsObj() {
        return GlobalResponse.buildFail(ResponseEnum.REQUEST_BREAKING);
    }

    @Override
    public GlobalResponse arrayInfo() {
        return GlobalResponse.buildFail(ResponseEnum.REQUEST_BREAKING);
    }

    @Override
    public GlobalResponse listInfo() {
        return GlobalResponse.buildFail(ResponseEnum.REQUEST_BREAKING);
    }
}
